package cn.cai.pethome.system.domain;


import cn.cai.pethome.base.domain.BaseDomain;
import cn.cai.pethome.dept.domain.Department;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiaocai
 * @since 2022-09-05
 */
@Data
public class Permission extends BaseDomain {

    private static final long serialVersionUID = 1L;

    private String name;
    private String url;
    private String descs;
    private String sn;
    private Long menu_id;
    private Long parent_id;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Permission> children = new ArrayList<>();//Permission的儿子

    public Permission() {}

    public Permission(String name, String sn, Long menu_id, Long parent_id) {
        this.name = name;
        this.sn = sn;
        this.menu_id = menu_id;
        this.parent_id = parent_id;
    }
}
